package ca.usherbrooke.domus.sipnmove2.model.call.impl;

import ca.usherbrooke.domus.sipnmove2.model.call.Call;
import ca.usherbrooke.domus.sipnmove2.model.call.CallFactory;
import ca.usherbrooke.domus.sipnmove2.model.call.CallState;

/**
 * Implementation of a call factory
 */
public class CallFactoryImpl implements CallFactory {

	/**
	 * Initial call state of created calls
	 */
	private CallState initialCallState;

	/**
	 * Default constructor
	 * @param initialCallState Initial call state
	 */
	public CallFactoryImpl(CallState initialCallState) {
		this.initialCallState = initialCallState;
	}
	
	@Override
	public Call createCall() {
		Call call = (Call) new CallImpl(initialCallState);
		return call;
	}

}
